/**
 * ************************************ 注册应用公共部分
 */
const ctx = require.context("./common", false, /\.vue$/)
const components = {}

ctx.keys().forEach(path => {
    const key = path.match(/\.\/(\w+)\.vue$/)[1]
    components[key] = ctx(path).default
});

export default {
    install(Vue) {
        for (let key in components) {
            Vue.component(key, components[key])
        }
    }
}
